home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / mui23dev.lha / MUI / Developer / Oberon / txt / MuiDemo.mod < prev    next >
Text File  |  1994-02-03  |  43KB  |  784 lines

  1. (*
  2. **          Oberon Source Code For The MUI Demo Program
  3. **          --------------------------------------
  4. **
  5. **               written 1993 by Albert Weinert
  6. **         based on the C Source Code from Stefan Stuntz
  7. **
  8. *)
  9. MODULE MuiDemo;
  10.  
  11. IMPORT  Mui, mb := MuiBasics, y := SYSTEM, Exec, gt := GadTools, u:=Utility, Dos;
  12.  
  13. (*
  14. ** A little array definition:
  15. *)
  16.  
  17. TYPE  S48 = ARRAY 48 OF Exec.STRPTR;
  18.  
  19. CONST
  20.   LVTBrian = S48(
  21.       y.ADR( "Cheer up, Brian. You know what they say." ),
  22.       y.ADR( "Some things in life are bad," ),
  23.       y.ADR( "They can really make you mad." ),
  24.       y.ADR( "Other things just make you swear and curse." ),
  25.       y.ADR( "When you're chewing on life's grissle," ),
  26.       y.ADR( "Don't grumble, give a whistle." ),
  27.       y.ADR( "And this'll help things turn out for the best," ),
  28.       y.ADR( "And..." ),
  29.       y.ADR( "" ),
  30.       y.ADR( "Always look on the bright side of life" ),
  31.       y.ADR( "Always look on the light side of life" ),
  32.       y.ADR( "" ),
  33.       y.ADR( "If life seems jolly rotten," ),
  34.       y.ADR( "There's something you've forgotten," ),
  35.       y.ADR( "And that's to laugh, and smile, and dance, and sing." ),
  36.       y.ADR( "When you're feeling in the dumps," ),
  37.       y.ADR( "Don't be silly chumps," ),
  38.       y.ADR( "Just purse your lips and whistle, that's the thing." ),
  39.       y.ADR( "And..." ),
  40.       y.ADR( "" ),
  41.       y.ADR( "Always look on the bright side of life, come on!" ),
  42.       y.ADR( "Always look on the right side of life" ),
  43.       y.ADR( "" ),
  44.       y.ADR( "For life is quite absurd," ),
  45.       y.ADR( "And death's the final word." ),
  46.       y.ADR( "You must always face the curtain with a bow." ),
  47.       y.ADR( "Forget about your sin," ),
  48.       y.ADR( "Give the audience a grin." ),
  49.       y.ADR( "Enjoy it, it's your last chance anyhow," ),
  50.       y.ADR( "So..." ),
  51.       y.ADR( "" ),
  52.       y.ADR( "Always look on the bright side of death" ),
  53.       y.ADR( "Just before you draw your terminal breath." ),
  54.       y.ADR( "" ),
  55.       y.ADR( "Life's a piece of shit," ),
  56.       y.ADR( "When you look at it." ),
  57.       y.ADR( "Life's a laugh, and death's a joke, it's true." ),
  58.       y.ADR( "You'll see it's all a show," ),
  59.       y.ADR( "Keep 'em laughing as you go," ),
  60.       y.ADR( "Just remember that the last laugh is on you." ),
  61.       y.ADR( "And..." ),
  62.       y.ADR( "" ),
  63.       y.ADR( "Always look on the bright side of life !" ),
  64.       y.ADR( "" ),
  65.       y.ADR( "..." ),
  66.       y.ADR( "" ),
  67.       y.ADR( "[Thanx to sprooney@unix1.tcd.ie and to M. Python]" ),
  68.       NIL );
  69.  
  70.  
  71.  
  72.  
  73. (*
  74. ** Convetional GadTools NewMenu structures. Since I was
  75. ** too lazy to construct my own object oriented menu
  76. ** system for now, this is the only part of MUI that needs
  77. ** "gadtools.library". Well, GadTools menus aren't that bad.
  78. ** Nevertheless, object oriented menus will come soon.
  79. *)
  80.  
  81. CONST
  82.   IDABOUT  = 1;
  83.   IDNEWVOL = 2;
  84.   IDNEWBRI = 3;
  85.  
  86. TYPE  Menu5 = ARRAY 5 OF gt.NewMenu;
  87.  
  88. CONST
  89.   Menu = Menu5(
  90.         gt.title, y.ADR( "Project" )  , NIL , {}, LONGSET{}, 0 ,
  91.         gt.item , y.ADR( "About..." ) , y.ADR( "?" ), {}, LONGSET{}, IDABOUT ,
  92.         gt.item , gt.barLabel         , NIL , {}, LONGSET{}, 0 ,
  93.         gt.item , y.ADR( "Quit" )     , y.ADR( "Q" ), {}, LONGSET{}, Mui.vApplicationReturnIDQuit,
  94.         0, NIL, NIL, {}, LONGSET{} , 0 );
  95.  
  96. (*
  97. ** Here are all the little info texts
  98. ** that appear at the top of each demo window.
  99. *)
  100.  
  101. CONST
  102.  
  103.   INMaster    = "\tWelcome to the MUI demonstration program. This little toy will show you how easy it is to create graphical user interfaces with MUI and how powerful the results are.\n\tMUI is based on BOOPSI, Amiga's basic object oriented programming system. For details about programming, see the 'ReadMe' file and the documented source code of this demo. Only one thing so far: it's really easy!\n\tNow go on, click around and watch this demo. Or use your keyboard (TAB, Return, Cursor-Keys) if you like that better. Hint: play around with the MUI preferences program and customize every pixel to fit your personal taste.";
  104.   INNotify    = "\tMUI objects communicate with each other with the aid of a broadcasting system. This system is frequently used in every MUI application. Binding an up and a down arrow to a prop gadget e.g. makes up a scrollbar, binding a scrollbar to a list makes up a listview. You can also bind windows to buttons, thus the window will be opened when the button is pressed.\n\tRemember: The main loop of this demo program simply consists of a Wait(). Once set up, MUI handles all user actions concerning the GUI automatically.";
  105.   INFrames    = "\tEvery MUI object can have a surrounding frame. Several types are available, all adjustable with the preferences program.";
  106.   INImages    = "\tMUI offers a vector image class, that allows images to be zoomed to any dimension. Every MUI image is transformed to match the current screens colors before displaying.\n\tThere are several standard images for often used GUI components (e.g. Arrows). These standard images can be defined via the preferences program.";
  107.   INGroups    = "\tGroups are very important for MUI. Their combinations determine how the GUI will look. A group may contain any number of child objects, which are positioned either horizontal or vertical.\n\tWhen a group is layouted, the available space is distributed between all of its children, depending on their minimum and maximum dimensions and on their weight.\n\tOf course, the children of a group may be other groups. There are no restrictions.";
  108.   INBackfill  = "\tEvery object can have his own background, if it wants to. MUI offers several standard backgrounds (e.g. one of the DrawInfo pens or one of the rasters below).\nThe prefs program allows defining a large number of backgrounds... try it!";
  109.   INListviews = "\tMUI's list class is very flexible. A list can be made up of any number of columns containing formatted text or even images. Several subclasses of list class (e.g. a directory class and a volume class) are available. All MUI lists have the capability of multi selection, just by setting a single flag.\n\tThe small info texts at the top of each demo window are made with floattext class. This one just needs a character string as input and formats the text according to its width.";
  110.   INCycle     = "\tCycle gadgets, radios buttons and simple lists can be used to let the user pick exactly one selection from a list of choices. In this example, all three possibilities are shown. Of course they are connected via broadcasting, so every object will immediately be notified and updated when necessary.";
  111.   INString    = "\tOf course, MUI offers a standard string gadget class for text input. The gadget in this example is attached to the list, you can control the list cursor from within the gadget.";
  112.  
  113.  
  114. (*
  115. ** This are the entries for the cycle gadgets and radio buttons.
  116. *)
  117. TYPE
  118.   S10 = ARRAY 10 OF Exec.STRPTR;
  119.   S4 = ARRAY 4 OF Exec.STRPTR;
  120.   S5 = ARRAY 5 OF Exec.STRPTR;
  121. CONST
  122.   CYAComputer = S10( y.ADR("Amiga 500"),
  123.                      y.ADR("Amiga 600"),
  124.                      y.ADR("Amiga 1000 :)"),
  125.                      y.ADR("Amiga 1200"),
  126.                      y.ADR("Amiga 2000"),
  127.                      y.ADR("Amiga 3000"),
  128.                      y.ADR("Amiga 4000"),
  129.                      y.ADR("Amiga 4000T"),
  130.                      y.ADR("Atari ST :("),
  131.                      NIL );
  132.  
  133.   CYAPrinter  =S4( y.ADR("HP Deskjet"),
  134.                    y.ADR("NEC P6"),
  135.                    y.ADR("Okimate 20"),
  136.                    NIL );
  137.  
  138.   CYADisplay  = S5( y.ADR("A1081"),
  139.                     y.ADR("NEC 3D"),
  140.                     y.ADR("A2024"),
  141.                     y.ADR("Eizo T660i"),
  142.                     NIL);
  143.  
  144.  
  145. (*
  146. ** Some Macros to make my life easier and the actual source
  147. ** code more readable.
  148. *)
  149.  
  150.   PROCEDURE List( ftxt : Exec.STRPTR );
  151.     BEGIN
  152.       mb.ListviewObject(  Mui.aWeight, 50,
  153.                            Mui.aListviewInput, Exec.false,
  154.                            u.end );
  155.           mb.Tag( Mui.aListviewList );
  156.           mb.FloattextObject( Mui.aFrame, Mui.vFrameReadList,
  157.                                Mui.aFloattextText, ftxt,
  158.                                Mui.aFloattextTabSize, 4,
  159.                                Mui.aFloattextJustify, Exec.true, u.end );
  160.           mb.end;
  161.       mb.end;
  162.     END List;
  163.  
  164.   PROCEDURE DemoWindow(name : ARRAY OF CHAR; id :ARRAY 4 OF CHAR; info : ARRAY OF CHAR);
  165.   (* $CopyArrays- *)
  166.     BEGIN
  167.       mb.WindowObject( Mui.aWindowTitle, y.ADR( name ),
  168.                         Mui.aWindowID, y.VAL(LONGINT, id),
  169.                         u.end );
  170.           mb.WindowContents;
  171.           mb.VGroup;
  172.               mb.Child; List(y.ADR( info ) );
  173.     END DemoWindow;
  174.  
  175.    PROCEDURE ImageLine(name : ARRAY OF CHAR; nr : LONGINT);
  176.      BEGIN
  177.        mb.HGroup;
  178.            mb.Child; mb.TextObject( Mui.aTextContents, y.ADR(name),
  179.                                       Mui.aTextPreParse, y.ADR("\033r"),
  180.                                       Mui.aFixWidthTxt, y.ADR("RadioButton:"),
  181.                                       u.end);
  182.                       mb.end;
  183.            mb.Child; mb.VGroup;
  184.                           mb.Child; mb.VSpace(0);
  185.                           mb.Child; mb.ImageObject( Mui.aImageSpec, nr, u.end ); mb.end;
  186.                           mb.Child; mb.VSpace(0);
  187.                       mb.end;
  188.        mb.end;
  189.      END ImageLine;
  190.  
  191.   PROCEDURE ScaledImage(nr : LONGINT; s : BOOLEAN; w,h : LONGINT);
  192.     VAR state : LONGINT;
  193.     BEGIN
  194.       state := LONG(LONG(y.VAL(SHORTINT,s)));
  195.       mb.ImageObject( Mui.aImageSpec, nr,
  196.                        Mui.aFixWidth, w,
  197.                        Mui.aFixHeight, h,
  198.                        Mui.aImageFreeHoriz, Exec.true,
  199.                        Mui.aImageFreeVert, Exec.true,
  200.                        Mui.aImageState, state, u.end );
  201.       mb.end;
  202.     END ScaledImage;
  203.  
  204.   PROCEDURE HProp():Mui.Object;
  205.     BEGIN
  206.        mb.PropObject;
  207.           mb.PropFrame;
  208.           mb.Tags( Mui.aPropHoriz, Exec.true,
  209.                    Mui.aFixHeight, 8,
  210.                    Mui.aPropEntries, 111,
  211.                    Mui.aPropVisible, 10, u.end );
  212.        RETURN mb.End()
  213.     END HProp;
  214.  
  215.   PROCEDURE VProp():Mui.Object;
  216.     BEGIN
  217.       mb.PropObject;
  218.          mb.PropFrame;
  219.          mb.Tags( Mui.aPropHoriz, Exec.false,
  220.                   Mui.aFixWidth , 8,
  221.                   Mui.aPropEntries, 111,
  222.                   Mui.aPropVisible, 10, u.end );
  223.       RETURN mb.End();
  224.     END VProp;
  225.  
  226.  
  227.   PROCEDURE fail( obj: Mui.Object; s: ARRAY OF CHAR );
  228.     BEGIN
  229.       IF obj # NIL THEN Mui.DisposeObject( obj ); END;
  230.       IF Dos.PutStr( s ) = 0 THEN END;
  231.       HALT( 20 );
  232.     END fail;
  233. (*
  234. ** For every object we want to refer later (e.g. for broadcasting purposes)
  235. ** we need a pointer. These pointers do not need to be static, but this
  236. ** saves stack space.
  237. *)
  238.  
  239. VAR
  240.   APDemo,
  241.   WIMaster,WIFrames,WIImages,WINotify,WIListviews,WIGroups,WIBackfill,WICycle,WIString,
  242.   BTNotify,BTFrames,BTImages,BTGroups,BTBackfill,BTListviews,BTCycle,BTString,BTQuit,
  243.   PRPropA,PRPropH,PRPropV,PRPropL,PRPropR,PRPropT,PRPropB,
  244.   LVVolumes,LVDirectory,LVComputer,LVBrian,
  245.   CYComputer,CYPrinter,CYDisplay,
  246.   MTComputer,MTPrinter,MTDisplay,
  247.   STBrian,
  248.   GAGauge1,GAGauge2,GAGauge3,
  249.   BPWheel : Mui.Object;
  250.  
  251.   signal : LONGSET;
  252.   running : BOOLEAN;
  253.   buf : Exec.STRPTR;
  254.   pos : LONGINT;
  255.   ding : POINTER TO LONGINT;
  256. (*
  257. ** This is where it all begins...
  258. *)
  259.  
  260. BEGIN
  261.  
  262. (*
  263. ** Every MUI application needs an application object
  264. ** which will hold general information and serve as
  265. ** a kind of anchor for user input, ARexx functions,
  266. ** commodities interface, etc.
  267. **
  268. ** An application may have any number of Mui.SubWindows
  269. ** which can all be created in the same call or added
  270. ** later, according to your needs.
  271. **
  272. ** Note that creating a window does not mean to
  273. ** open it, this will be done later by setting
  274. ** the windows open attribute.
  275. *)
  276.  
  277.   mb.ApplicationObject( Mui.aApplicationTitle         , y.ADR("Oberon MUI-Demo"),
  278.                         Mui.aApplicationVersion       , y.ADR("$VER: Oberon MUI-Demo 1.0 (25.8.93)"),
  279.                         Mui.aApplicationCopyright     , y.ADR("Copyright ©1993, Stefan Stuntz/Albert Weinert"),
  280.                         Mui.aApplicationAuthor        , y.ADR("Stefan Stuntz/Albert Weinert"),
  281.                         Mui.aApplicationDescription   , y.ADR("Demonstrate the features of MUI."),
  282.                         Mui.aApplicationBase          , y.ADR("MUIDEMO"),
  283.                         Mui.aApplicationMenu          , y.ADR(Menu), u.end );
  284.      mb.SubWindow;
  285.           DemoWindow("String","STRG",INString);
  286.                   mb.Child; mb.ListviewObject( Mui.aListviewInput, Exec.true,  u.end );
  287.                                  mb.Tag( Mui.aListviewList ); mb.ListObject; mb.InputListFrame; mb.end;
  288.                              LVBrian := mb.End();
  289.                   mb.Child; mb.StringObject; mb.StringFrame; STBrian:= mb.End();
  290.                   mb.end;
  291.            WIString:=mb.End();
  292.  
  293.       mb.SubWindow;
  294.           DemoWindow("Cycle Gadgets & RadioButtons",'CYCL',INCycle);
  295.               mb.Child;
  296.               mb.HGroup;
  297.                   mb.Child; MTComputer := mb.Radio("Computer:", y.ADR( CYAComputer  ) );
  298.                   mb.Child; mb.VGroup;
  299.                                  mb.Child; MTPrinter := mb.Radio("Printer:",y.ADR( CYAPrinter) );
  300.                                  mb.Child; mb.VSpace(0);
  301.                                  mb.Child; MTDisplay := mb.Radio("Display:",y.ADR( CYADisplay) );
  302.                              mb.end;
  303.                   mb.Child; mb.VGroup;
  304.                           mb.Child; mb.ColGroup(2); mb.GroupFrameT( "Cycle Gadgets" );
  305.                                   mb.Child; mb.label1("Computer:"); mb.Child; CYComputer := mb.KeyCycle( y.ADR( CYAComputer ),'c');
  306.                                   mb.Child; mb.label1("Printer:" ); mb.Child; CYPrinter  := mb.KeyCycle( y.ADR( CYAPrinter ) ,'p');
  307.                                   mb.Child; mb.label1("Display:" ); mb.Child; CYDisplay  := mb.KeyCycle( y.ADR( CYADisplay ),'d');
  308.                                   mb.end;
  309.                           mb.Child; mb.ListviewObject( Mui.aListviewInput, Exec.true, u.end );
  310.                                          mb.Tag( Mui.aListviewList ); mb.ListObject; mb.InputListFrame; mb.end;
  311.                                      LVComputer:= mb.End();
  312.                           mb.end;
  313.                       mb.end;
  314.               mb.end;
  315.           WICycle:=mb.End();
  316.  
  317.       mb.SubWindow;
  318.               DemoWindow("Listviews",'LIST',INListviews);
  319.                   mb.Child; mb.HGroup; mb.GroupFrameT( "Dir & Volume List" );
  320.                       mb.Child; mb.ListviewObject( Mui.aListviewInput, Exec.true,
  321.                                                      Mui.aListviewMultiSelect, Exec.true,
  322.                                                      u.end );
  323.                                      mb.Tag( Mui.aListviewList ); mb.DirlistObject;
  324.                                                                      mb.InputListFrame;
  325.                                                                        mb.TagItem( Mui.aDirlistDirectory, y.ADR("ram:") );
  326.                                                                   mb.end;
  327.                                  LVDirectory := mb.End();
  328.                       mb.Child; mb.ListviewObject( Mui.aWeight, 20,
  329.                                                      Mui.aListviewInput, Exec.true,
  330.                                                      u.end );
  331.                                      mb.Tag( Mui.aListviewList ); mb.VolumelistObject;
  332.                                                                     mb.InputListFrame;
  333.                                                                     mb.TagItem( Mui.aDirlistDirectory, y.ADR("ram:") );
  334.                                                                   mb.end;
  335.                                  LVVolumes := mb.End();
  336.                       mb.end;
  337.                   mb.end;
  338.               WIListviews := mb.End();
  339.  
  340.       mb.SubWindow;
  341.               DemoWindow("Notifying",'BRCA',INNotify);
  342.                       mb.Child; mb.HGroup; mb.GroupFrameT( "Connections" );
  343.                               mb.Child; mb.GaugeObject;
  344.                                           mb.TagItem2( Mui.aGaugeHoriz, Exec.false, Mui.aFixWidth, 16 );
  345.                                           mb.GaugeFrame;
  346.                                         GAGauge1 := mb.End();
  347.                               mb.Child; PRPropL := VProp();
  348.                               mb.Child; PRPropR := VProp();
  349.                               mb.Child; mb.VGroup;
  350.                                             mb.Child; mb.VSpace(0);
  351.                                             mb.Child; PRPropA := HProp();
  352.                                             mb.Child; mb.HGroup;
  353.                                                           mb.Child; PRPropH := HProp();
  354.                                                           mb.Child; PRPropV := HProp();
  355.                                                        mb.end;
  356.                                             mb.Child; mb.VSpace(0);
  357.                                             mb.Child; mb.VGroup; mb.GroupSpacing(1);
  358.                                                           mb.Child; mb.GaugeObject;
  359.                                                                       mb.GaugeFrame;
  360.                                                                       mb.TagItem( Mui.aGaugeHoriz, Exec.true );
  361.                                                                     GAGauge2 := mb.End();
  362.                                                           mb.Child; mb.ScaleObject( Mui.aScaleHoriz, Exec.true, u.end ); mb.end;
  363.                                                        mb.end;
  364.                                             mb.Child; mb.VSpace(0);
  365.                                             mb.end;
  366.                               mb.Child; PRPropT := VProp();
  367.                               mb.Child; PRPropB := VProp();
  368.                               mb.Child; mb.GaugeObject;
  369.                                           mb.GaugeFrame;
  370.                                           mb.TagItem2( Mui.aGaugeHoriz, Exec.false,
  371.                                                        Mui.aFixWidth, 16);
  372.                                         GAGauge3 := mb.End();
  373.                               mb.end;
  374.                       mb.end;
  375.               WINotify := mb.End();
  376.  
  377.       mb.SubWindow;
  378.           DemoWindow("Backfill",'BACK',INBackfill);
  379.               mb.Child; mb.VGroup; mb.GroupFrameT( "Standard Backgrounds" );
  380.                          mb.Child; mb.HGroup;
  381.                                      mb.Child; mb.RectangleObject;
  382.                                                  mb.TextFrame;
  383.                                                  mb.TagItem( Mui.aBackground, Mui.iBACKGROUND );
  384.                                                mb.end;
  385.                                      mb.Child; mb.RectangleObject;
  386.                                                   mb.TextFrame;
  387.                                                   mb.TagItem( Mui.aBackground, Mui.iFILL );
  388.                                                   mb.end;
  389.                                      mb.Child; mb.RectangleObject;
  390.                                                  mb.TextFrame;
  391.                                                  mb.TagItem( Mui.aBackground, Mui.iSHADOW );
  392.                                                mb.end;
  393.                                    mb.end;
  394.                         mb.Child; mb.HGroup;
  395.                                     mb.Child; mb.RectangleObject;
  396.                                                 mb.TextFrame;
  397.                                                 mb.TagItem( Mui.aBackground, Mui.iSHADOWBACK);
  398.                                               mb.end;
  399.                                     mb.Child; mb.RectangleObject;
  400.                                                 mb.TextFrame;
  401.                                                 mb.TagItem( Mui.aBackground, Mui.iSHADOWFILL );
  402.                                               mb.end;
  403.                                     mb.Child; mb.RectangleObject;
  404.                                                 mb.TextFrame;
  405.                                                 mb.TagItem( Mui.aBackground, Mui.iSHADOWSHINE );
  406.                                               mb.end;
  407.                                   mb.end;
  408.                         mb.Child; mb.HGroup;
  409.                                     mb.Child; mb.RectangleObject;
  410.                                                 mb.TextFrame;
  411.                                                 mb.TagItem( Mui.aBackground, Mui.iFILLBACK );
  412.                                               mb.end;
  413.                                     mb.Child; mb.RectangleObject;
  414.                                                 mb.TextFrame;
  415.                                                 mb.TagItem( Mui.aBackground, Mui.iSHINEBACK );
  416.                                               mb.end;
  417.                                     mb.Child; mb.RectangleObject;
  418.                                                 mb.TextFrame;
  419.                                                 mb.TagItem( Mui.aBackground, Mui.iFILLSHINE );
  420.                                               mb.end;
  421.                                   mb.end;
  422.                       mb.end;
  423.               mb.end;
  424.           WIBackfill := mb.End();
  425.  
  426.       mb.SubWindow;
  427.               DemoWindow("Groups",'GRPS',INGroups);
  428.                       mb.Child; mb.HGroup; mb.GroupFrameT( "Group Types" );
  429.                               mb.Child; mb.HGroup; mb.GroupFrameT( "Horizontal" );
  430.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  431.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  432.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  433.                                       mb.end;
  434.                               mb.Child; mb.VGroup; mb.GroupFrameT( "Vertical" );
  435.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  436.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  437.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  438.                                       mb.end;
  439.                               mb.Child; mb.ColGroup(3); mb.GroupFrameT( "Array" );
  440.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  441.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  442.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  443.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  444.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  445.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  446.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  447.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  448.                                       mb.Child; mb.RectangleObject; mb.TextFrame; mb.end;
  449.                                       mb.end;
  450.                               mb.end;
  451.                       mb.Child; mb.HGroup; mb.GroupFrameT( "Different Weights" );
  452.                               mb.Child; mb.TextObject;
  453.                                           mb.TextFrame;
  454.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033c25 kg"  ), Mui.aWeight, 25 );
  455.                                         mb.end;
  456.                               mb.Child; mb.TextObject;
  457.                                           mb.TextFrame;
  458.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033c50 kg"  ), Mui.aWeight, 50 );
  459.                                         mb.end;
  460.                               mb.Child; mb.TextObject;
  461.                                           mb.TextFrame;
  462.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033c75 kg"  ), Mui.aWeight, 75 );
  463.                                         mb.end;
  464.                               mb.Child; mb.TextObject;
  465.                                           mb.TextFrame;
  466.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033c100 kg" ), Mui.aWeight,100 );
  467.                                         mb.end;
  468.                               mb.end;
  469.                       mb.Child; mb.HGroup; mb.GroupFrameT( "Fixed & Variable Sizes" );
  470.                               mb.Child; mb.TextObject;
  471.                                           mb.TextFrame;
  472.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "fixed"     ), Mui.aTextSetMax, Exec.true );
  473.                                         mb.end;
  474.                               mb.Child; mb.TextObject;
  475.                                           mb.TextFrame;
  476.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033cfree" ), Mui.aTextSetMax, Exec.false);
  477.                                         mb.end;
  478.                               mb.Child; mb.TextObject;
  479.                                           mb.TextFrame;
  480.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "fixed"     ), Mui.aTextSetMax, Exec.true) ;
  481.                                         mb.end;
  482.                               mb.Child; mb.TextObject;
  483.                                           mb.TextFrame;
  484.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "\033cfree" ), Mui.aTextSetMax, Exec.false);
  485.                                         mb.end;
  486.                               mb.Child; mb.TextObject;
  487.                                           mb.TextFrame;
  488.                                           mb.TagItem3( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR( "fixed"     ), Mui.aTextSetMax, Exec.true) ;
  489.                                         mb.end;
  490.                               mb.end;
  491.                       mb.end;
  492.               WIGroups := mb.End();
  493.  
  494.       mb.SubWindow;
  495.               DemoWindow("Frames",'FRMS', INFrames);
  496.                       mb.Child; mb.ColGroup(2);
  497.                               mb.Child; mb.TextObject;
  498.                                           mb.ButtonFrame;
  499.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cButton"     ) );
  500.                                         mb.end;
  501.                               mb.Child; mb.TextObject;
  502.                                           mb.ImageButtonFrame;
  503.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cImageButton") );
  504.                                         mb.end;
  505.                               mb.Child; mb.TextObject;
  506.                                           mb.TextFrame;
  507.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cText"       ) );
  508.                                         mb.end;
  509.                               mb.Child; mb.TextObject;
  510.                                           mb.StringFrame;
  511.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cString"     ) );
  512.                                         mb.end;
  513.                               mb.Child; mb.TextObject;
  514.                                           mb.ReadListFrame;
  515.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cReadList"   ) );
  516.                                         mb.end;
  517.                               mb.Child; mb.TextObject;
  518.                                           mb.InputListFrame;
  519.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cInputList"  ) );
  520.                                         mb.end;
  521.                               mb.Child; mb.TextObject;
  522.                                           mb.PropFrame;
  523.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cProp Gadget") );
  524.                                         mb.end;
  525.                               mb.Child; mb.TextObject;
  526.                                           mb.GroupFrame;
  527.                                           mb.TagItem2( Mui.aBackground, Mui.iTextBack, Mui.aTextContents, y.ADR("\033cGroup"      ) );
  528.                                         mb.end;
  529.                               mb.end;
  530.                       mb.end;
  531.               WIFrames := mb.End();
  532.  
  533.       mb.SubWindow;
  534.               DemoWindow("Images",'IMGS',INImages);
  535.                       mb.Child; mb.HGroup;
  536.                               mb.Child; mb.VGroup; mb.GroupFrameT( "Standard Images" );
  537.                                       mb.Child; ImageLine("ArrowUp:"    , Mui.iArrowUp    );
  538.                                       mb.Child; ImageLine("ArrowDown:"  , Mui.iArrowDown  );
  539.                                       mb.Child; ImageLine("ArrowLeft:"  , Mui.iArrowLeft  );
  540.                                       mb.Child; ImageLine("ArrowRight:" , Mui.iArrowRight );
  541.                                       mb.Child; ImageLine("RadioButton:", Mui.iRadioButton);
  542.                                       mb.Child; ImageLine("File:"       , Mui.iPopFile    );
  543.                                       mb.Child; ImageLine("HardDisk:"   , Mui.iHardDisk   );
  544.                                       mb.Child; ImageLine("Disk:"       , Mui.iDisk       );
  545.                                       mb.Child; ImageLine("Chip:"       , Mui.iChip       );
  546.                                       mb.Child; ImageLine("Drawer:"     , Mui.iDrawer     );
  547.                                       mb.end;
  548.                               mb.Child; mb.VGroup; mb.GroupFrameT( "Scale Engine"  );
  549.                                       mb.Child; mb.VSpace(0);
  550.                                       mb.Child; mb.HGroup;
  551.                                               mb.Child; ScaledImage(Mui.iRadioButton, TRUE, 17,9);
  552.                                               mb.Child; ScaledImage(Mui.iRadioButton, TRUE, 20,12);
  553.                                               mb.Child; ScaledImage(Mui.iRadioButton, TRUE, 23,15);
  554.                                               mb.Child; ScaledImage(Mui.iRadioButton, TRUE, 26,18);
  555.                                               mb.Child; ScaledImage(Mui.iRadioButton, TRUE, 29,21);
  556.                                               mb.end;
  557.                                       mb.Child; mb.VSpace(0);
  558.                                       mb.Child; mb.HGroup;
  559.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,13,7);
  560.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,16,10);
  561.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,19,13);
  562.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,22,16);
  563.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,25,19);
  564.                                               mb.Child; ScaledImage(Mui.iCheckMark, TRUE,28,22);
  565.                                               mb.end;
  566.                                       mb.Child; mb.VSpace(0);
  567.                                       mb.Child; mb.HGroup;
  568.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,12,10);
  569.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,15,13);
  570.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,18,16);
  571.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,21,19);
  572.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,24,22);
  573.                                               mb.Child; ScaledImage(Mui.iPopFile, FALSE,27,25);
  574.                                               mb.end;
  575.                                       mb.Child; mb.VSpace(0);
  576.                                       mb.end;
  577.                               mb.end;
  578.                       mb.end;
  579.               WIImages := mb.End();
  580.  
  581.       mb.SubWindow;
  582.               mb.WindowObject( Mui.aWindowTitle, y.ADR( "MUI-Demo" ),
  583.                                 Mui.aWindowID   , y.VAL(LONGINT, 'MAIN' ),
  584.                                 u.end );
  585.                       mb.WindowContents; mb.VGroup;
  586.                       mb.Child; mb.TextObject;
  587.                                   mb.GroupFrame;
  588.                                   mb.TagItem2( Mui.aBackground, Mui.iSHADOWFILL, Mui.aTextContents, y.ADR( "\033c\0338MUI - \033bM\033nagic\033bU\033nser\033bI\033nnterface\nwritten 1993 by Stefan Stuntz" ) );
  589.                                 mb.end;
  590.  
  591.                       mb.Child; List( y.ADR( INMaster) );
  592.  
  593.                       mb.Child; mb.VGroup; mb.GroupFrameT( "Available Demos" );
  594.                               mb.Child; mb.HGroup;
  595.                                           mb.TagItem( Mui.aGroupSameWidth, Exec.true );
  596.                                           mb.Child; BTGroups := mb.KeyButton("Groups"   ,'g');
  597.                                           mb.Child; BTFrames := mb.KeyButton("Frames"   ,'f');
  598.                                           mb.Child; BTBackfill := mb.KeyButton("Backfill" ,'b');
  599.                                         mb.end;
  600.                               mb.Child; mb.HGroup;
  601.                                       mb.TagItem( Mui.aGroupSameWidth, Exec.true );
  602.                                       mb.Child; BTNotify    := mb.KeyButton("Notify",'n');
  603.                                       mb.Child; BTListviews := mb.KeyButton("Listviews",'l');
  604.                                       mb.Child; BTCycle     := mb.KeyButton("Cycle"    ,'c');
  605.                                       mb.end;
  606.                               mb.Child; mb.HGroup;
  607.                                       mb.TagItem( Mui.aGroupSameWidth, Exec.true);
  608.                                       mb.Child;BTImages    := mb.KeyButton("Images"   ,'i');
  609.                                       mb.Child;BTString    := mb.KeyButton("Strings"  ,'s');
  610.                                       mb.Child;BTQuit      := mb.KeyButton("Quit"     ,'q');
  611.  
  612.                                       mb.end;
  613.                               mb.end;
  614.                       mb.end;
  615.               WIMaster := mb.End();
  616.  
  617.   APDemo := mb.End();
  618.  
  619.  
  620. (*
  621. ** See if the application was created. The fail function
  622. ** is defined in demos.h;it deletes every created object
  623. ** and closes "muimaster.library".
  624. **
  625. ** Note that we do not need any
  626. ** error control for the sub objects since every error
  627. ** will automatically be forwarded to the parent object
  628. ** and cause this one to fail too.
  629. *)
  630.  
  631.   IF APDemo = NIL THEN fail(APDemo,"Failed to create application.") END;
  632.  
  633.  
  634.  
  635. (*
  636. ** Here comes the broadcast magic. Notifying means:
  637. ** When an attribute of an object changes;then please change
  638. ** another attribute of another object (accordingly) or send
  639. ** a method to another object.
  640. *)
  641.  
  642. (*
  643. ** Lets bind the sub windows to the corresponding button
  644. ** of the master window.
  645. *)
  646.  
  647.         Mui.DoMethod(BTFrames   ,Mui.mNotify,Mui.aPressed,Exec.false,WIFrames   ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  648.         Mui.DoMethod(BTImages   ,Mui.mNotify,Mui.aPressed,Exec.false,WIImages   ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  649.         Mui.DoMethod(BTNotify   ,Mui.mNotify,Mui.aPressed,Exec.false,WINotify,  3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  650.         Mui.DoMethod(BTListviews,Mui.mNotify,Mui.aPressed,Exec.false,WIListviews,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  651.         Mui.DoMethod(BTGroups   ,Mui.mNotify,Mui.aPressed,Exec.false,WIGroups   ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  652.         Mui.DoMethod(BTBackfill ,Mui.mNotify,Mui.aPressed,Exec.false,WIBackfill ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  653.         Mui.DoMethod(BTCycle    ,Mui.mNotify,Mui.aPressed,Exec.false,WICycle    ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  654.         Mui.DoMethod(BTString   ,Mui.mNotify,Mui.aPressed,Exec.false,WIString   ,3,Mui.mSet,Mui.aWindowOpen,Exec.true);
  655.  
  656.         Mui.DoMethod(BTQuit     ,Mui.mNotify,Mui.aPressed,Exec.false,APDemo,2,Mui.mApplicationReturnID,Mui.vApplicationReturnIDQuit);
  657.  
  658.  
  659. (*
  660. ** Automagically remove a window when the user hits the close gadget.
  661. *)
  662.  
  663.         Mui.DoMethod(WIImages   ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIImages   ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  664.         Mui.DoMethod(WIFrames   ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIFrames   ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  665.         Mui.DoMethod(WINotify   ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WINotify   ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  666.         Mui.DoMethod(WIListviews,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIListviews,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  667.         Mui.DoMethod(WIGroups   ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIGroups   ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  668.         Mui.DoMethod(WIBackfill ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIBackfill ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  669.         Mui.DoMethod(WICycle    ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WICycle    ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  670.         Mui.DoMethod(WIString   ,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,WIString   ,3,Mui.mSet,Mui.aWindowOpen,Exec.false);
  671.  
  672.  
  673. (*
  674. ** Closing the master window forces a complete shutdown of the application.
  675. *)
  676.  
  677.         Mui.DoMethod(WIMaster,Mui.mNotify,Mui.aWindowCloseRequest,Exec.true,APDemo,2,Mui.mApplicationReturnID,Mui.vApplicationReturnIDQuit);
  678.  
  679.  
  680. (*
  681. ** This connects the prop gadgets in the broadcast demo window.
  682. *)
  683.  
  684.         Mui.DoMethod(PRPropA,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropH,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  685.         Mui.DoMethod(PRPropA,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropV,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  686.         Mui.DoMethod(PRPropH,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropL,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  687.         Mui.DoMethod(PRPropH,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropR,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  688.         Mui.DoMethod(PRPropV,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropT,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  689.         Mui.DoMethod(PRPropV,Mui.mNotify,Mui.aPropFirst,Mui.vEveryTime,PRPropB,3,Mui.mSet,Mui.aPropFirst,Mui.vTriggerValue);
  690.  
  691.         Mui.DoMethod(PRPropA ,Mui.mNotify,Mui.aPropFirst   ,Mui.vEveryTime,GAGauge2,3,Mui.mSet,Mui.aGaugeCurrent,Mui.vTriggerValue);
  692.         Mui.DoMethod(GAGauge2,Mui.mNotify,Mui.aGaugeCurrent,Mui.vEveryTime,GAGauge1,3,Mui.mSet,Mui.aGaugeCurrent,Mui.vTriggerValue);
  693.         Mui.DoMethod(GAGauge2,Mui.mNotify,Mui.aGaugeCurrent,Mui.vEveryTime,GAGauge3,3,Mui.mSet,Mui.aGaugeCurrent,Mui.vTriggerValue);
  694.  
  695.  
  696. (*
  697. ** And here we connect cycle gadgets;radio buttons and the list in the
  698. ** cycle & radio window.
  699. *)
  700.  
  701.         Mui.DoMethod(CYComputer,Mui.mNotify,Mui.aCycleActive,Mui.vEveryTime,MTComputer,3,Mui.mSet,Mui.aRadioActive,Mui.vTriggerValue);
  702.         Mui.DoMethod(CYPrinter ,Mui.mNotify,Mui.aCycleActive,Mui.vEveryTime,MTPrinter ,3,Mui.mSet,Mui.aRadioActive,Mui.vTriggerValue);
  703.         Mui.DoMethod(CYDisplay ,Mui.mNotify,Mui.aCycleActive,Mui.vEveryTime,MTDisplay ,3,Mui.mSet,Mui.aRadioActive,Mui.vTriggerValue);
  704.         Mui.DoMethod(MTComputer,Mui.mNotify,Mui.aRadioActive,Mui.vEveryTime,CYComputer,3,Mui.mSet,Mui.aCycleActive,Mui.vTriggerValue);
  705.         Mui.DoMethod(MTPrinter ,Mui.mNotify,Mui.aRadioActive,Mui.vEveryTime,CYPrinter ,3,Mui.mSet,Mui.aCycleActive,Mui.vTriggerValue);
  706.         Mui.DoMethod(MTDisplay ,Mui.mNotify,Mui.aRadioActive,Mui.vEveryTime,CYDisplay ,3,Mui.mSet,Mui.aCycleActive,Mui.vTriggerValue);
  707.         Mui.DoMethod(MTComputer,Mui.mNotify,Mui.aRadioActive,Mui.vEveryTime,LVComputer,3,Mui.mSet,Mui.aListActive ,Mui.vTriggerValue);
  708.         Mui.DoMethod(LVComputer,Mui.mNotify,Mui.aListActive ,Mui.vEveryTime,MTComputer,3,Mui.mSet,Mui.aRadioActive,Mui.vTriggerValue);
  709.  
  710.  
  711. (*
  712. ** This one makes us receive input ids from several list views.
  713. *)
  714.  
  715.         Mui.DoMethod(LVVolumes ,Mui.mNotify,Mui.aListviewDoubleClick,Exec.true,APDemo,2,Mui.mApplicationReturnID,IDNEWVOL);
  716.         Mui.DoMethod(LVBrian   ,Mui.mNotify,Mui.aListActive,Mui.vEveryTime,APDemo,2,Mui.mApplicationReturnID,IDNEWBRI);
  717.  
  718.  
  719. (*
  720. ** Now lets set the TAB cycle chain for some of our windows.
  721. *)
  722.  
  723.         Mui.DoMethod(WIMaster   ,Mui.mWindowSetCycleChain,BTGroups,BTFrames,BTBackfill,BTNotify,BTListviews,BTCycle,BTImages,BTString,NIL);
  724.         Mui.DoMethod(WIListviews,Mui.mWindowSetCycleChain,LVDirectory,LVVolumes,NIL);
  725.         Mui.DoMethod(WICycle    ,Mui.mWindowSetCycleChain,MTComputer,MTPrinter,MTDisplay,CYComputer,CYPrinter,CYDisplay,LVComputer,NIL);
  726.         Mui.DoMethod(WIString   ,Mui.mWindowSetCycleChain,STBrian,NIL);
  727.  
  728.  
  729. (*
  730. ** Set some start values for certain objects.
  731. *)
  732.  
  733.         Mui.DoMethod(LVComputer,Mui.mListInsert, y.ADR( CYAComputer),-1,Mui.vListInsertBottom);
  734.         Mui.DoMethod(LVBrian   ,Mui.mListInsert, y.ADR( LVTBrian),-1,Mui.vListInsertBottom);
  735.         mb.Set(LVComputer,Mui.aListActive,0);
  736.         mb.Set(LVBrian   ,Mui.aListActive,0);
  737.         mb.Set(STBrian   ,Mui.aStringAttachedList,LVBrian);
  738.  
  739.  
  740. (*
  741. ** Everything's ready;lets launch the application. We will
  742. ** open the master window now.
  743. *)
  744.  
  745.         mb.Set(WIMaster,Mui.aWindowOpen,Exec.true);
  746.  
  747.  
  748. (*
  749. ** This is the main loop. As you can see;it does just nothing.
  750. ** Everything is handled by MUI;no work for the programmer.
  751. **
  752. ** The only thing we do here is to react on a double click
  753. ** in the volume list (which causes an IDNEWVOL) by setting
  754. ** a new directory name for the directory list. If you want
  755. ** to see a real file requester with MUI;wait for the
  756. ** next release of MFR :-)
  757. *)
  758.  
  759.   running := TRUE;
  760.  
  761.   WHILE running DO
  762.     CASE Mui.DOMethod( APDemo,Mui.mApplicationInput,y.ADR( signal ) ) OF
  763.       | Mui.vApplicationReturnIDQuit: running := FALSE;
  764.  
  765.       | IDNEWVOL : Mui.DoMethod( LVVolumes, Mui.mListGetEntry, Mui.vListGetEntryActive, y.ADR( buf ) );
  766.                    mb.Set( LVDirectory, Mui.aDirlistDirectory, buf );
  767.  
  768.  
  769.       | IDNEWBRI:  mb.Get( LVBrian, Mui.aListActive, pos );
  770.                    mb.Set( STBrian, Mui.aStringContents, LVTBrian[ pos ]);
  771.  
  772.       | IDABOUT:   IF Mui.Request(APDemo,WIMaster,0,NIL,"*OK","Oberon MUI-Demo\n© 1993 by Albert Weinert") = 0 THEN END;
  773.     ELSE END;
  774.     IF signal # LONGSET{} THEN y.SETREG( 0, Exec.Wait(signal) ) END;;
  775.   END;
  776.  
  777.   Mui.DisposeObject( APDemo );
  778.  
  779.  
  780. (*
  781. ** This is the end...
  782. *)
  783. END MuiDemo.
  784.